home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
image
/
multi207.zip
/
START.BAS
< prev
next >
Wrap
BASIC Source File
|
1997-03-18
|
6KB
|
384 lines
'0.20
$com 0
$error all off
$lib com off, lpt on, graph off, fullfloat off, iprint off
$option autodim off, cntlbreak off
$sound 0
menu:
cls
print "F1- Help
print
print "F2- Display the documentation
print
print "F3- Print the documentation
print
print "Esc- Quit
menuloop:
gosub presskey
if a$=chr$(27) then
cls
end
end if
if a$=chr$(0)+chr$(59) then
gosub helpscre
goto menu
end if
if a$=chr$(0)+chr$(60) then
file$="mscope.doc"
gosub displayf
goto menu
end if
if a$=chr$(0)+chr$(61) then
file$="mscope.doc"
gosub printfil
goto menu
end if
goto menuloop
displayf:
dim pageup$(9999)
cls
open "i",1,file$
print
color 0,7
print "Loading...."
color 7,0
gosub loadline
if count<0 then count=0
cls
printlin:
print pageup$(count)
count=count+1
lin=lin+1
if lin=22 then
if count>lineload and endoffil=1 then doendstu
gosub pausescr
gosub processk
if a$=chr$(27) then
close 1
count=0
lin=0
lineload=0
pageup=0
endoffil=0
return
end if
lin=0
end if
if count>9999 then count=9999
doendstu:
if count>lineload then
if endoffil=1 then
gosub pausescr
gosub processk
if a$=chr$(27) then
close 1
count=0
lin=0
lineload=0
pageup=0
endoffil=0
return
end if
lin=0
if pageup=1 then
pageup=0
goto printlin
end if
count=count-22
if endwatch<22 then count=0
goto printlin
end if
gosub loadline
count=count+1
end if
goto printlin
pausescr:
a$=inkey$
if a$="" then goto pausescr
cls
return
processk:
if a$=chr$(27) then return
if a$=chr$(0)+chr$(73) then
gosub parsescr
gosub pausescr
goto processk
end if
if a$=chr$(0)+chr$(79) then
gosub loadline
count=count-22
end if
if ucase$(a$)="F" then
color 0,7
input "Find: ",findtex$
gosub findtext
end if
if ucase$(a$)="A" then gosub findtext
return
loadline:
if a$=chr$(0)+chr$(79) then
if endoffil=0 then
while not eof(1)
line input #1, lin$
if eof(1)=-1 then endoffil=1
count=count+1
pageup$(count)=lin$
lineload=lineload+1
wend
count=count+1
lineload=count
return
end if
if endoffil=1 then
count=lineload
return
end if
end if
lineload=lineload+250
loadloop:
if eof(1)=-1 then
endoffil=1
lineload=count
endwatch=endwatch+1
count=count-endwatch
return
end if
if lineload>9999 then lineload=9999
line input#1, lin$
pageup$(count)=lin$
if count=lineload then
count=count-250
endwatch=0
return
end if
count=count+1
endwatch=endwatch+1
goto loadloop
findtext:
color 0,7
print "Searching for: ";findtex$
color 7,0
if lcase$(findtex$)=findtex$ then goto anycase
if endoffil=1 then
savecoun=count
count=foundcou
endoffio:
count=count+1
if instr(pageup$(count),findtex$)>0 then
foundcou=count
return
end if
if count=lineload then
foundcou=0
count=savecoun
count=count-23
if count<0 then count=0
savecoun=0
return
end if
goto endoffio
end if
savecoun=count
count=foundcou
notendof:
count=count+1
if instr(pageup$(count),findtex$)>0 then
foundcou=count
return
end if
if count>lineload then gosub loadline
if eof(1)=-1 then
foundcou=0
endoffil=1
count=savecoun
count=count-23
savecoun=0
return
end if
goto notendof
return
anycase:
if endoffil=1 then
savecoun=count
count=foundcou
endoffia:
count=count+1
if instr(ucase$(pageup$(count)),ucase$(findtex$))>0 then
foundcou=count
return
end if
if count=lineload then
foundcou=0
count=savecoun
count=count-23
if count<0 then count=0
savecoun=0
return
end if
goto endoffia
end if
savecoun=count
count=foundcou
notendoa:
count=count+1
if instr(ucase$(pageup$(count)),ucase$(findtex$))>0 then
foundcou=count
return
end if
if count>lineload then gosub loadline
if eof(1)=-1 then
foundcou=0
endoffil=1
count=savecoun
count=count-23
savecoun=0
return
end if
goto notendoa
return
parsescr:
count=count-44
if count<0 then count=0
linecoun=0
parseloo:
print pageup$(count)
linecoun=linecoun+1
count=count+1
if linecoun=22 then
pageup=1
return
end if
goto parseloo
lastpage:
gosub pausescr
gosub processk
lin=0
return
printfil:
open "i",1,file$
heading:
cls
print "Printing...";
print
print
print "Press space bar to pause printing, or Esc to quit.
print
print
printmor:
line input# 1, lin$
lprint lin$
a$=inkey$
if a$=chr$(27) then
print "Printing has been terminated. The printer may still have data in its
print "buffer. If so, it will continue printing until the buffer is empty.
lprint chr$(12)
close 1
print
print
return
end if
if a$=chr$(32) then
print "Press any key to resume printing. ";
gosub presskey
if eof(1) then goto eofp
goto heading
end if
if eof(1) then goto eofp
goto printmor
eofp:
print "Finished.
close 1
lprint chr$(12)
return
presskey:
a$=inkey$
if a$="" then goto presskey
return
helpscre:
cls
print "Pressing the F1 key gets you this screen.
print
print "Pressing the F2 key lets you display the file on the screen.
print
print "Use PgDn to go forward, PgUp to go back, and Esc to quit. The F key lets
print "you find a specific phrase, and the A key will let you search for that phrase
print "again.
print
print "To move to the end of the file, use the End key.
print
print "To print the file, just turn on your printer, make sure it's ready to go, and
print "press F3.
print
print
print "Press a key... ";
gosub presskey
return